﻿using UnityEngine;
using System.Collections;

[USequencerEvent("声音/停止播放声音")]
public class USStopAudioEvent : USEventBase {
	public override void FireEvent()
	{
		if(!AffectedObject)
		{
            Debug.Log("参数没有设定AffectedObject");
			return;
		}
		
		AudioSource audio = AffectedObject.GetComponent<AudioSource>();
		if(!audio)
		{
            Debug.Log("AffectedObject缺少AudioSource组件");
			return;
		}
		
		audio.Stop();
	}
	
	public override void ProcessEvent(float deltaTime)
	{
		
	}
}
